<template>
    <div class="left">
        左侧组件{{count}}<br/>
        <button @click="add">加一</button>
    </div>
</template>

<script>
    export default {
        name: "Left",
        data(){
            return {
                count:0
            }
        },
        methods:{
            add(){
                this.count++;
            }
        },
        activated(){
            console.log('组件被激活了，activated');
        },
        deactivated(){
            console.log('组件被缓存了，deactivated');
        }
    }
</script>

<style scoped>
    .left{
        background-color: #5bc0de;
        min-height: 250px;
        flex: 1;
    }
</style>
